<?php
require_once('../include/control/context.php.inc');
require_once('../admin/header.php.inc');
if(!$current_usr || $current_usr.id!='1084588625'){
	header("Location: /");
}
?>

<a href="/admin/category.php">create new category</a>
<table>
  <tr>
    <th>id</th>
    <th>name</th>
    <th>screen_name</th>
    <th>notes</th>
    <th>status</th>
    <th>list_order</th>
    <th>post_count</th>
    <th></th>
  </tr><?php 
  $html='';
  foreach ($categories as $cat){
  		$html = $html.'<tr>';
  		$html = $html. "<td>$cat->id</td>";
  		$html = $html. "<td>$cat->name</td>";
  		$html = $html. "<td>$cat->screen_name</td>";
  		$html = $html. "<td>$cat->notes</td>";
  		$html = $html. "<td>$cat->status</td>";
  		$html = $html. "<td>$cat->list_order</td>";
  		$html = $html. "<td>$cat->post_count</td>";
  		$html = $html. '<td><a href="/admin/category.php?id='. $cat->id .'">edit</a></td>';
		$html = $html.'</tr>';
 }
 echo $html;
  ?>
</table>


<?php
require_once('../admin/footer.php.inc');
?>